package Thread;

public class Dom4 {
    public static void main(String[] args) throws InterruptedException {
        Thread t=new Thread(){
            @Override
            public void run() {
                System.out.println("使用匿名内部类创建 therad对象");
            }
        };
        t.start();
        while (true){
            Thread.sleep(1000);
            System.out.println("hello main");
        }
    }

}
